Ext.define('CDR.view.manager.pbx.PBXViewForm', {
    extend: 'Ext.form.Panel',
    alias : 'widget.pbxviewform',
	buttonAlign:'center',
	border: false,
	title: 'PBX',
	bodyStyle:'padding:5px 5px 0',
	fieldDefaults: {
		msgTarget: 'side',
		labelWidth: 65
	},
	initComponent: function() {
		var me = this;
		me.callParent();
		me.store = Ext.create('CDR.store.manager.pbx.PBXViewFormStore');
	},
	items: [{
		xtype: 'container',
		anchor: '100%',
		layout:'column',
		items: [{
			xtype:'container',
			columnWidth:.25,
			layout: 'anchor',
			items: [{
				xtype:'textfield',
				fieldLabel: 'Name',
				name:'name',
				allowBlank: false,
				anchor:'96%',
				labelWidth: 50
			},{
				xtype:'hidden',
				name:'factoryId',
			},{
				xtype:'hidden',
				name:'obId',
			}]
		}, {
			xtype:'container',
			columnWidth:.55,
			layout: 'anchor',
			items: [{
				xtype:'textareafield',
				fieldLabel: 'Description',
				name:'description',
				anchor:'96%',
				labelWidth: 75
			}]
		}]
	}]
	,
	buttons:[
		{
			text: 'Save',
			iconCls: 'icon-save',
			formBind: true,
			action: 'save'
		},{	
			text: 'Reset',
			handler: function () {
				this.up('form').getForm().reset();
			}
		}
	]
});